/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vn.ac.c0910g.assignment.Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author BachLe
 */
@Entity
@Table(name = "FAQS")
@NamedQueries({
    @NamedQuery(name = "Faqs.findAll", query = "SELECT f FROM Faqs f"),
    @NamedQuery(name = "Faqs.findByFaqsid", query = "SELECT f FROM Faqs f WHERE f.faqsid = :faqsid"),
    @NamedQuery(name = "Faqs.findByQuestion", query = "SELECT f FROM Faqs f WHERE f.question = :question"),
    @NamedQuery(name = "Faqs.findByAnswer", query = "SELECT f FROM Faqs f WHERE f.answer = :answer"),
    @NamedQuery(name = "Faqs.findByVisiable", query = "SELECT f FROM Faqs f WHERE f.visiable = :visiable")})
public class Faqs implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "FAQSID")
    private Integer faqsid;
    @Basic(optional = false)
    @Column(name = "Question")
    private String question;
    @Basic(optional = false)
    @Column(name = "Answer")
    private String answer;
    @Column(name = "Visiable")
    private Integer visiable;

    public Faqs() {
    }

    public Faqs(Integer faqsid) {
        this.faqsid = faqsid;
    }

    public Faqs(Integer faqsid, String question, String answer) {
        this.faqsid = faqsid;
        this.question = question;
        this.answer = answer;
    }

    public Integer getFaqsid() {
        return faqsid;
    }

    public void setFaqsid(Integer faqsid) {
        this.faqsid = faqsid;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Integer getVisiable() {
        return visiable;
    }

    public void setVisiable(Integer visiable) {
        this.visiable = visiable;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (faqsid != null ? faqsid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Faqs)) {
            return false;
        }
        Faqs other = (Faqs) object;
        if ((this.faqsid == null && other.faqsid != null) || (this.faqsid != null && !this.faqsid.equals(other.faqsid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "vn.ac.c0910g.assignment.DAO.Faqs[faqsid=" + faqsid + "]";
    }

}
